package minimips.isa.jtype;

import minimips.isa.InstructionSpecification;

public class JTypeSpecification extends InstructionSpecification {

	private int absoluteAddress;
	
	public JTypeSpecification(int opcode, int absoluteAddress) {
		super(opcode);
		this.absoluteAddress = absoluteAddress;
	}

	@Override
	public int getMachineCode() {
		int machineCode = (getOpcode() << 26) | absoluteAddress;
		return machineCode;
	}

	public int getAbsoluteAddress() {
		return absoluteAddress;
	}
}
